<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddWaimaiTjFixData extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('waimai_orders', function (Blueprint $table) {
            $table->integer('otherPrice')->default(0)->comment('其他支出')->after('refundPrice');
        });

        Schema::table('waimai_order_details', function (Blueprint $table) {
            $table->unsignedInteger('productType')->default(1)->comment('1菜 2包装物')->after('orderId');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('waimai_orders', function (Blueprint $table) {
            $table->dropColumn('otherPrice');
        });

        Schema::table('waimai_order_details', function (Blueprint $table) {
            $table->dropColumn('productType');
        });
    }
}
